package cn.sxt.questions.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import cn.sxt.users.pojo.POJOEnum;

public class Items implements Serializable{
	
	private Integer id;
	private String name;
	private String content;
	private Byte status;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;
	private Integer columnsId;
	private Integer testedNum;
	private Integer favNum;
	private Integer suggNum;
	private Integer questionNum;
	private Integer outId;
	private String imgPath;
	private Columns columns;
	private List<Question> questionList=new ArrayList<Question>();
	
	/**
	 * 一对多的方法
	 * @return
	 */
	public List<Question> getQuestionList() {
		return questionList;
	}
	public void setQuestionList(List<Question> questionList) {
		this.questionList = questionList;
	}
	private String statusStr;
	public Integer getQuestionNum() {
		return questionNum;
	}
	public void setQuestionNum(Integer questionNum) {
		this.questionNum = questionNum;
	}
	public Integer getOutId() {
		return outId;
	}
	public void setOutId(Integer outId) {
		this.outId = outId;
	}
	public String getImgPath() {
		return imgPath;
	}
	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}
	
	public Columns getColumns() {
		return columns;
	}
	public void setColumns(Columns columns) {
		this.columns = columns;
	}
	public String getStatusStr() {
		POJOEnum[] pojoEnums=POJOEnum.values();
		for (int i = 0; i < pojoEnums.length; i++) {
			POJOEnum pojoEnum=pojoEnums[i];
			if(pojoEnum.toString().startsWith("STATUS_")
					&& pojoEnum.getStatus()==this.getStatus()){
				this.statusStr=pojoEnum.getName();
			}
		}
		return statusStr;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Byte getStatus() {
		return status;
	}
	public void setStatus(Byte status) {
		this.status = status;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public Date getPubTime() {
		return pubTime;
	}
	public void setPubTime(Date pubTime) {
		this.pubTime = pubTime;
	}
	public Integer getColumnsId() {
		return columnsId;
	}
	public void setColumnsId(Integer columnsId) {
		this.columnsId = columnsId;
	}
	public Integer getTestedNum() {
		return testedNum;
	}
	public void setTestedNum(Integer testedNum) {
		this.testedNum = testedNum;
	}
	public Integer getFavNum() {
		return favNum;
	}
	public void setFavNum(Integer favNum) {
		this.favNum = favNum;
	}
	public Integer getSuggNum() {
		return suggNum;
	}
	public void setSuggNum(Integer suggNum) {
		this.suggNum = suggNum;
	}
	
}
